/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package BoardGameLanguage;

import org.eclipse.emf.ecore.EObject;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Figure</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>
 * The following features are supported:
 * <ul>
 *   <li>{@link BoardGameLanguage.Figure#getField <em>Field</em>}</li>
 *   <li>{@link BoardGameLanguage.Figure#getBoard <em>Board</em>}</li>
 * </ul>
 * </p>
 *
 * @see BoardGameLanguage.BoardGameLanguagePackage#getFigure()
 * @model abstract="true"
 * @generated
 */
public interface Figure extends EObject {
	/**
	 * Returns the value of the '<em><b>Field</b></em>' reference.
	 * It is bidirectional and its opposite is '{@link BoardGameLanguage.Field#getFigure <em>Figure</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Field</em>' reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Field</em>' reference.
	 * @see #setField(Field)
	 * @see BoardGameLanguage.BoardGameLanguagePackage#getFigure_Field()
	 * @see BoardGameLanguage.Field#getFigure
	 * @model opposite="figure" required="true"
	 * @generated
	 */
	Field getField();

	/**
	 * Sets the value of the '{@link BoardGameLanguage.Figure#getField <em>Field</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Field</em>' reference.
	 * @see #getField()
	 * @generated
	 */
	void setField(Field value);

	/**
	 * Returns the value of the '<em><b>Board</b></em>' container reference.
	 * It is bidirectional and its opposite is '{@link BoardGameLanguage.Board#getFigures <em>Figures</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Board</em>' container reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Board</em>' container reference.
	 * @see #setBoard(Board)
	 * @see BoardGameLanguage.BoardGameLanguagePackage#getFigure_Board()
	 * @see BoardGameLanguage.Board#getFigures
	 * @model opposite="figures" transient="false"
	 * @generated
	 */
	Board getBoard();

	/**
	 * Sets the value of the '{@link BoardGameLanguage.Figure#getBoard <em>Board</em>}' container reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Board</em>' container reference.
	 * @see #getBoard()
	 * @generated
	 */
	void setBoard(Board value);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='// TODO: implement this method\n// Ensure that you remove @generated or mark it @generated NOT\nthrow new UnsupportedOperationException();'"
	 * @generated
	 */
	void move(Field targetField);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model annotation="SDM XMI='<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGameLanguage#//Figure/performMove\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"Figure::performMove (targetField: Field): void\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"ActivityNode4\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 #//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGameLanguage#//Figure\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"currentField\" type=\"ecore:EClass http://www.moflon.org/BoardGameLanguage#//Field\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"DESTROY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"field\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"targetField\" type=\"ecore:EClass http://www.moflon.org/BoardGameLanguage#//Field\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"field\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.1 \" name=\"\" />\r\n</SDMLanguage.activities:Activity>'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='boolean fujaba__Success = false;\n      Field currentField = null;\n\n      // story pattern ActivityNode4\n      try \n      {\n         fujaba__Success = false; \n\n         // check object targetField is really bound\n         JavaSDM.ensure ( targetField != null );\n         // bind object\n         currentField = this.getField ();\n\n         // check object currentField is really bound\n         JavaSDM.ensure ( currentField != null );\n\n         // check isomorphic binding between objects targetField and currentField\n         JavaSDM.ensure ( !targetField.equals (currentField) );\n\n\n         // destroy link\n         currentField.setFigure(null);\n         // create link\n         targetField.setFigure( this);\n\n         fujaba__Success = true;\n      }\n      catch ( JavaSDMException fujaba__InternalException )\n      {\n         fujaba__Success = false;\n      }\n\n      return ;'"
	 * @generated
	 */
	void performMove(Field targetField);

} // Figure
